//#include "qfx_opengl.h"
//#include "qfx_settings.h"

#include <dlfcn.h>
#include <cstdio>

#include <GL/glx.h>

#include <X11/X.h>    /* X11 constant (e.g. TrueColor) */
#include <X11/keysym.h>

int main()
{
    /*if (gl::Initialize())
        gl::InitializeExtensions();

    printf("%s\n", QFXSettings::Instance().m_szExeName);
    printf("%s\n", QFXSettings::Instance().m_szIniFile);*/

    void* lib = dlopen("/home/freeslave/git_projects/freeslave93-qeffects-gl/QeffectsGL.so", RTLD_NOW);

    if (lib)
    {
        printf("ok");
    }

    typedef Bool ( * pfn_glXQueryExtension)( Display *dpy, int *errorb, int *event );
    pfn_glXQueryExtension sym = (pfn_glXQueryExtension)dlsym(lib, "glXQueryExtension");

    if (sym)
    {
        int dummy;
        Display   *dpy;
        dpy = XOpenDisplay(NULL);
        sym(dpy, &dummy, &dummy);
        printf("ok");
    }

    dlclose(lib);

}
